package service.impl;

import dao.WorkPlanMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pojo.DoctorWork;
import pojo.WorkPlan;
import service.WorkPlanService;

import java.util.Date;
import java.util.List;

@Service
public class WorkPlanServiceImpl implements WorkPlanService {

    @Autowired
    private WorkPlanMapper workPlanMapper;

    @Override
    public WorkPlan findByDay(Date day) {
        return workPlanMapper.findByDay(day);
    }

    @Override
    public List<WorkPlan> findAll() {
        return workPlanMapper.findAll();
    }

    @Override
    public int addWorkPlan(WorkPlan workPlan) {
        return workPlanMapper.addWorkPlan(workPlan);
    }

    @Override
    public int updateWorkPlan(WorkPlan workPlan) {
        return workPlanMapper.updateWorkPlan(workPlan);
    }

    @Override
    public int deleteWorkPlan(Date day) {
        return workPlanMapper.deleteWorkPlan(day);
    }

    @Override
    public List<DoctorWork> getWorkPlanByWeek(String week) {
        return workPlanMapper.getWorkPlanByWeek(week);
    }

}